﻿<!DOCTYPE HTML>
<html>
    <head>
        <script src="__PUBLIC__/HomeStyle/js/allmobilize.min.js" charset="utf-8" id="allmobilize">
        </script>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>{$company.name}-招聘网-最专业的互联网招聘平台</title>
        <meta name="description" content="{$company.name} {$company.name} {$company.city} {$company.trade} {$company.stage} {$company.scale} {$company.one_desc}">
        <meta name="keywords" content="{$company.name} {$company.name} {$company.city} {$company.trade} {$company.stage} {$company.scale} {$company.one_desc}">
        <!-- <div class="web_root" style="display:none">http://www.lagou.com</div> -->
        <link href="__PUBLIC__/HomeStyle/css/style.css" type="text/css" rel="stylesheet">
        <link href="__PUBLIC__/HomeStyle/css/external.min.css" type="text/css" rel="stylesheet">
        <link href="__PUBLIC__/HomeStyle/css/popup.css" type="text/css" rel="stylesheet">
        <script type="text/javascript" src="__PUBLIC__/HomeStyle/js/jquery.1.10.1.min.js"></script>
        <script src="__PUBLIC__/HomeStyle/js/jquery.lib.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="__PUBLIC__/HomeStyle/js/ajaxfileupload.js"></script>
        <script src="__PUBLIC__/HomeStyle/js/additional-methods.js" type="text/javascript"></script>
        <!--[if lte IE 8]>
            <script type="text/javascript" src="__PUBLIC__/HomeStyle/js/excanvas.js">
            </script>
        <![endif]-->
    </head>
    
    <body>
        <div id="body">
            <include file="Public/header" nav="company" />
            <!-- end #header -->
            <div id="container">
                <div class="clearfix">
                    <div class="content_l">
                        <div class="c_detail">
                            <div style="background-color:#fff;" class="c_logo">
                                <a title="上传公司LOGO" id="logoShow" >
                                    <img class="logo_success" width="190" height="190" alt="公司logo" src="{$company.logo}">
                                </a>
                            </div>
                            <div class="c_box companyName">
                                <h2 title="{$company.name}">
                                    {$company.name}
                                </h2>
                                <if condition="$company['state'] eq 1">
                                    <em class="valid"></em>
                                    <span class="va dn">
                                        招聘认证企业
                                    </span>
                                <else />
                                    <em class="unvalid"></em>
                                    <span class="va dn">
                                        招聘未认证企业
                                    </span>
                                </if>
                                <div class="clear"></div>
                                <h1 title="{$company.name}" class="fullname">
                                    {$company.name}
                                </h1>
                                <div class="clear oneword">
                                    <img width="17" height="15" src="__PUBLIC__/HomeStyle/images/quote_l.png">
                                    &nbsp;
                                    <span>
                                        {$company.one_desc}
                                    </span>
                                    &nbsp;
                                    <img width="17" height="15" src="__PUBLIC__/HomeStyle/images/quote_r.png">
                                </div>
                                <h3 class="dn">
                                    已选择标签
                                </h3>
                                <ul style="overflow:auto" id="hasLabels" class="reset clearfix">
                                    <foreach name="tag" item="val">
                                    <li><span>{$val.name}</span></li>
                                    </foreach>
                                </ul>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="c_breakline"></div>
                        <div id="Product">
                            <foreach name="product" item="proVal">
                            <div class="product_wrap hasProduct">
                                <dl class="c_product">
                                    <dt>
                                        <h2>
                                            <em></em>
                                            公司产品
                                        </h2>
                                    </dt>
                                    <dd>
                                        <img width="380" height="220" alt="{$proVal.name}" src="{$proVal.image}">
                                        <div class="cp_intro">
                                            <h3>
                                                <a target="_blank" href="{$proVal.link}" class="proName">
                                                    {$proVal.name}
                                                </a>
                                            </h3>
                                            <div class="scroll-pane" style="overflow: hidden; padding: 0px; width: 260px;">
                                                <div class="jspContainer" style="width: 260px; height: 140px;">
                                                    <div class="jspPane" style="padding: 0px; top: 0px; width: 260px;">
                                                        <div class="proDesc">
                                                            {$proVal.desc}
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </dd>
                                </dl>
                            </div>
                            </foreach>
                        </div>
                        <!-- end #Product -->
                        <empty name="company.desc">
                        <else />
                        <div id="Profile">
                            <div class="profile_wrap">   
                                <dl class="c_section hasdesc">
                                    <dt>
                                        <h2>
                                            <em></em>
                                            公司介绍
                                        </h2>
                                    </dt>
                                    <dd>
                                        <div class="c_intro">
                                            {$company.desc}
                                        </div>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                        </empty>
                        <!-- end #Profile -->
                        <!--[if IE 7]>
                            <br />
                        <![endif]-->
                        <!--无招聘职位-->
                        <empty name="job">
                        <else />
                        <dl class="c_section">
                            <dt>
                                <h2>
                                    <em></em>
                                    招聘职位
                                </h2>
                                <span class="jobsTotal">
                                    该公司共有
                                    <i>
                                        {$jobnum}
                                    </i>
                                    个职位正在招聘
                                </span>
                            </dt>
                            <dd>
                                <ul class="reset c_jobs" id="jobList">
                                    <foreach name="job" item="jobVal">
                                    <li>
                                        <a href="{:U('Home/JobShow/index', array('jid'=>$jobVal['id']))}" target="_blank">
                                            <h3>
                                                <span class="pos" title="{$jobVal.name}">
                                                    {$jobVal.name}
                                                </span>
                                                <span>
                                                    [{$jobVal.city}]
                                                </span>
                                            </h3>
                                            <span>
                                                {$jobVal.create_time|date="y-m-d H:i:m",###}
                                            </span>
                                            <div>
                                                {$jobVal.nature} / {$jobVal.salary_high}k-{$jobVal.salary_low}k / {$jobVal.work_year} / {$jobVal.edu}
                                            </div>
                                        </a>
                                    </li>
                                    </foreach>
                                </ul>
                            </dd>
                        </dl>
                        </empty>
                    </div>
                    <!-- end .content_l -->
                    <div class="content_r">
                        <div id="Tags">
                            <div id="c_tags_show" class="c_tags solveWrap">
                                <table>
                                    <tbody>
                                        <tr>
                                            <td width="45">
                                                地点
                                            </td>
                                            <td class="companyCity">
                                                {$company.city}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                领域
                                            </td>
                                            <!-- 支持多选 -->
                                            <td title="{$company.trade}" class="companyTrade">
                                                {$company.trade}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                规模
                                            </td>
                                            <td class="companyScale">
                                                {$company.scale}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                主页
                                            </td>
                                            <td>
                                                <a rel="nofollow" title="http://www.weimob.com" target="_blank" href="{$company.web}" class="companyWeb">
                                                   {$company.web}
                                                </a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!-- end #Tags -->
                        <dl class="c_section c_stages">
                            <dt>
                                <h2>
                                    <em></em>
                                    融资阶段
                                </h2>
                            </dt>
                            <dd>
                                <ul class="reset stageshow">
                                    <li>
                                        目前阶段：
                                        <span class="c5">
                                            {$company.stage}
                                        </span>
                                    </li>
                                </ul>
                            </dd>
                        </dl>
                        <!-- end .c_stages -->
                        <empty name="team">
                        <else />
                        <div id="Member">
                            <!--有创始团队-->
                            <dl class="c_section c_member">
                                <dt>
                                    <h2>
                                        <em></em>
                                        创始团队
                                    </h2>
                                </dt>
                                <dd>
                                    <foreach name="team" item="teamVal">
                                    <div class="member_wrap hasTeam">
                                        <div class="member_info">
                                            <div class="m_portrait">
                                                <div></div>
                                                <img width="120" height="120" alt="{$teamVal.name}" src="{$teamVal.image}">
                                            </div>
                                            <div class="m_name">
                                                {$teamVal.name}
                                                <empty name="teamVal.weibo">
                                                <else />
                                                <a target="_blank" class="weibo" href="{$teamVal.weibo}"></a>
                                                </empty>
                                            </div>
                                            <div class="m_position">
                                                {$teamVal.position}
                                            </div>
                                            <div class="m_intro">
                                                {$teamVal.desc}
                                            </div>
                                        </div>
                                    </div>
                                    </foreach>
                                    <!-- end .member_wrap -->
                                </dd>
                            </dl>
                        </div>
                        </empty>
                        <!-- end #Member -->
                    </div>
                </div>
                <script src="__PUBLIC__/HomeStyle/js/company.min.js" type="text/javascript"></script>
                <div class="clear"></div>
                <a rel="nofollow" title="回到顶部" id="backtop" style="display: inline;"></a>
            </div>
            <!-- end #container -->
        </div>
        <!-- end #body -->
        <include file="Public/footer" />
        <script src="__PUBLIC__/HomeStyle/js/core.min.js" type="text/javascript">
        </script>
        <script src="__PUBLIC__/HomeStyle/js/popup.min.js" type="text/javascript">
        </script>
        <script type="text/javascript">

            /**
             * @param string 上传地址
             * @param string file表单id
             * @param string 要修改的dom节点
             */
            function uploadFile(url, file_id, class_id) {
                var url = url;
                var file_id = file_id;
                var file_obj = $('#'+file_id);
                var class_obj = $('.'+class_id);
                var n = $('#'+file_id).next();
                console.log(file_obj.attr('name'));
                $.ajaxFileUpload({
                    url : url,
                    fileElementId : file_id,
                    secureuri: false,
                    dataType : 'json',
                    data : {fid:file_obj.attr('name'), id:file_obj.attr('id')},
                    type : 'post',
                    success : function(data) {
                        console.log(data);
                        n.val(data.url);
                        data.url = data.url + '?' + parseInt(Math.random()*10000);
                        class_obj.attr('src', data.url);
                    }
                })
            }

            jQuery(function($) {
                if ($('.hasProduct').length <= 0) {
                    $('.no_product').removeClass('dn');
                }

                if ($('.hasTeam').length <= 0) {
                    $('.noTeam').removeClass('dn');
                }

                $.extend({
                    sub : function(obj) {
                        obj = $(obj);
                        $.ajax({
                            url : obj.attr('action'),
                            type : 'post',
                            data : obj.serialize(),
                            success : function(data) {

                                if (data.code == 0) {
                                    $('.fullname').html(data.name);
                                    $('.fullname').attr('title', data.name);
                                    $('.oneword').children('span').html(data.one_desc);
                                    obj.parents('#c_tags_edit').addClass('dn');
                                    obj.parents('#c_tags_edit').prev().removeClass('dn');
                                    obj.parents('#c_tags_edit').prev().find('.companyCity').html(data.city);
                                    obj.parents('#c_tags_edit').prev().find('.companyTrade').html(data.trade);
                                    obj.parents('#c_tags_edit').prev().find('.companyTrade').attr('title', data.trade);
                                    obj.parents('#c_tags_edit').prev().find('.companyScale').html(data.scale);
                                    obj.parents('#c_tags_edit').prev().find('.companyWeb').html(data.web);
                                    obj.parents('#c_tags_edit').prev().find('.companyWeb').attr('title', data.web);
                                    obj.parents('#c_tags_edit').prev().find('.companyWeb').attr('href', data.web);
                                    obj.addClass('dn');
                                    obj.prev().removeClass('dn');
                                    obj.prev().find('.c5').html(data.stage);
                                } else if (data.code == 1) {
                                    obj.parents('dl').addClass('dn');
                                    obj.parents('dl').next().removeClass('dn');
                                    obj.parents('dl').next().find('img').attr('alt', data.name);
                                    obj.parents('dl').next().find('h3').children('a').attr('href', data.link).html(data.name);
                                    data.image = data.image + '?' + parseInt(Math.random()*10000);
                                    obj.parents('dl').next().find('img').attr('src', data.image);
                                    obj.parents('dl').next().find('.proDesc').html(data.desc);
                                } else if (data.code == 2) {
                                    obj.parents('dl').addClass('dn');
                                    obj.parents('dl').next().removeClass('dn');
                                    obj.parents('dl').next().find('.c_intro').html(data.desc);
                                } else if (data.code == -1) {
                                    obj.parents('dl').addClass('dn');
                                    obj.parents('dl').prev().removeClass('dn');
                                } else if (data.code == 3) {
                                    obj.parents('.member_info').addClass('dn');
                                    obj.parents('.member_info').next().removeClass('dn');
                                    obj.parents('.member_info').next().find('img').attr('alt', data.name);
                                    obj.parents('.member_info').next().find('img').attr('src', data.image);
                                    obj.parents('.member_info').next().find('.m_name').html(data.name);
                                    obj.parents('.member_info').next().find('.m_name').children('a').attr('href', data.weibo);
                                    obj.parents('.member_info').next().find('.m_position').html(data.position);
                                    obj.parents('.member_info').next().find('.m_intro').html(data.desc);
                                }
                            }
                        })
                        return false;
                    }
                })

                $('#saveDetail').click(function() {
                    $(this).parent().addClass('dn');
                })

                $('#saveLabels').click(function() {
                    var a=[];
                    $("#hasLabels").children().each(function(){
                        a.push($(this).children("span").text());
                    }),
                    $("#hasLabels li").each(function() {
                        $(this).find("i").remove()
                    }),
                    $("#addLabels").hide(),
                    $("#hasLabels").append('<li class="link">编辑</li>'),
                    $.ajax({
                        type:"POST",
                        data:{labels:a.join()},
                        url: "{:U('Home/CompanyInfo/label')}",
                        success : function(data) {
                        }
                    })
                })

                $('.product_delete').click(function() {
                    if (confirm('你确定删除此产品?')){
                        $.ajax({
                            url : "{:U('Home/CompanyProduct/delete')}",
                            data : $(this).parents('form').serialize(),
                            type : 'post',
                            sussecc : function(data) {
                            }
                        })
                        $(this).parents('.product_wrap').empty();
                    } else {
                        $(this).parents('dl').addClass('dn');
                        $(this).parents('dl').next().removeClass('dn');
                    }
                })

                $('#editIntro').click(function() {
                    $(this).parents('dl').addClass('dn');
                    $(this).parents('dl').prev().removeClass('dn');
                })

                $('#addIntro').click(function() {
                    $(this).parents('dl').addClass('dn');
                    $(this).parents('dl').next().removeClass('dn');
                })

                $('#delProfile').click(function() {
                    $(this).parents('dl').addClass('dn');
                    $(this).parents('dl').next().removeClass('dn');
                })

                $('.stage_edit').click(function() {
                    $(this).parents('dt').next().find('.stageshow').addClass('dn');
                    $(this).parents('dt').next().find('form').removeClass('dn');
                })

                $('#cancelStages').click(function() {
                    $(this).parents('form').addClass('dn');
                    $(this).parents('form').prev().removeClass('dn');
                })

                $('.member_delete').click(function() {
                    if (confirm('are you sur')){
                        $.ajax({
                            url : "{:U('Home/CompanyTeam/delete')}",
                            data : $(this).parents('form').serialize(),
                            type : 'post',
                            sussecc : function(data) {
                            }
                        })
                        $(this).parents('.member_wrap').empty();
                    } else {
                        $(this).parents('.member_info').addClass('dn');
                        $(this).parents('.member_info').next().removeClass('dn');
                    }
                })

            })
        </script>
    </body>

</html>